var app = getApp();

Page({
    data: {
        _is_load: !0,
        is_akey: !1
    },
    onLoad: function(a) {
        var t = this;
        app.util.footer(this), app.util.request({
            url: "entry/wxapp/Setup",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                t.setData({
                    setup: a.data.data,
                    audio: a.data.data.audio
                });
            }
        }), app.util.request({
            url: "entry/wxapp/GetCard",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                0 == a.data.errno && t.setData({
                    my_card_info: a.data.data
                });
            }
        });
    },
    onReady: function() {},
    onShow: function() {
        this.Onexchange(1), this.setData({
            sysinfo: app.globalData.sysinfo,
            _is_load: !1
        });
    },
    Onexchange: function() {
        var t = this;
        app.util.request({
            url: "entry/wxapp/GetTCard",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                0 == a.data.errno && t.setData({
                    t_card_info: a.data.data,
                    _is_load: !1
                });
            }
        }), app.util.request({
            url: "entry/wxapp/GetTCardb",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                0 == a.data.errno && t.setData({
                    tb_card_info: a.data.data
                });
            }
        }), app.util.request({
            url: "entry/wxapp/GetTCardh",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                0 == a.data.errno && t.setData({
                    th_card_info: a.data.data
                });
            }
        });
    },
    to_mails: function(a) {
        JSON.stringify(a.detail.value);
        var t = a.detail.formId, n = this.data.my_card_info.id, e = a.currentTarget.id, r = a.currentTarget.dataset.to, d = a.currentTarget.dataset.t_openid;
        app.util.request({
            url: "entry/wxapp/PsotTCard",
            data: {
                m: "bbyscm_card",
                form_id: t,
                my_cardid: n,
                t_cardid: e,
                t_openid: d,
                to: r
            },
            success: function(a) {}
        }), this.setData({
            is_load_more: !0,
            t_card_info: [],
            tb_card_info: [],
            th_card_info: []
        }), this.Onexchange(1);
    },
    look_card_info_bind: function(a) {
        wx.navigateTo({
            url: "../../card/info/info?card_id=" + a.currentTarget.id
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});